home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
sound
/
players
/
qdplay31.lzh
/
PLAY.DOC
< prev
next >
Wrap
Text File
|
1993-08-04
|
11KB
|
301 lines
QD Play
Version 3.1
By Dave Baggett
Copyright (C) 1990, 1991, 1992, 1993 by David M. Baggett
--------------------------------------------------------------------------------
User Contract
This program is FREE. You may distribute it at will, provided you
1) do not charge any money for it,
2) distribute it WITH the documentation, and
3) do not change the program or documentation in ANY WAY.
--------------------------------------------------------------------------------
Command Line Usage
------------------
This utility will play 8-bit sound samples. To call it from a
command shell (e.g. GULAM), type
play <pathname> <Hz>
where <pathname> is the name of the sample file, and <Hz> is the
playback frequency in Hertz. For example, type
play deadjim.snd 11000
and you will hear Bones and Captain Kirk. Note that the program
doesn't care how fast or slow you play the sample, so try
play deadjim.snd 18000
and
play deadjim.snd 7500
to see the effect of changing the playback speed.
AUTO Folder usage
-----------------
Isn't it *nifty* how those Mac people can make their computers play
digitized sounds when they boot up? Well, now you too can experience
the tremendous joy of hearing your machine make some obnoxious noise
when you turn it on. Here's how:
Put play.prg in your AUTO folder. Use autosort to make play.prg
the first thing to get called on bootup. You can do this by hand
by saving a copy of your AUTO programs, deleting your AUTO folder,
then copying the AUTO programs into a fresh AUTO folder in the
order in which you want the AUTO programs to be called. (For all
you programmer types: NO it's not a requirement that play.prg get
called first, it's just more Mac-ish that way.)
Then create a file called play.inf with a text editor containing
lines that are just QD Play command lines. E.g.,:
deadjim.snd 18000
deadjim.110 11000 -v -l -hippo
stereo.125 10000 -2 -d
NOTE: There can be no blank lines in the file. QD Play picks a random
line of the file; if that line is blank no sound will be played. Similarly,
all options for a sound must go on a single line.
There is no limit to the number of lines in play.inf.
Specifying an Alternate D/A Device
----------------------------------
The following options select the various supported playback devices:
-hippo: use Hippo digitizer
-replay: use ST Replay digitizer
-ste: use STe sound, using MFP for timing
-dma: use STe sound, using DMA for timing
All these except -replay can be abbreviated by their first letters. The
-replay switch can be minimally abbreviated to -re to distinguish it
from the -r (reverse) option.
Other Exciting Options
----------------------
The -q option will prevent QD Play from printing its cheerful greeting
message. For example,
play d:\usr\sounds\attack.snd 11000 -q
will play attack.snd without printing a blurb.
Similarly, the -v option forces QD Play to print its message even
when its run from the AUTO folder.
The -r option will cause QD Play to play the sound in reverse.
The -l option tells QD Play to loop the sample either 5 times or
until a key is pressed. You can also specifiy a number of times to
loop; e.g, -l15 will loop 15 times or until a key is pressed.
CAVEAT: Do NOT try this with samples faster than about 16 kHz using the
ST speaker for playback. Beyond 16 kHz the sample playing interrupts happen
so often that they make the TOS keyboard handler flakey, which often results
in TOTAL SYSTEM LOCKUP. (And lots of bombs and other cool stuff on the
screen.)
The -2 option makes QD Play interpret the sample data as stereo, where
alternating bytes go to the left and right channels. Note that you can play
stereo sounds on any device, but on mono devices the two channels will be
mixed. This usually sounds bad if the stereo sample has panning effects.
The -z option tells QD Play to interpret the sample data as
signed magnitude instead of the standard (as far as I'm concerned
at least) unsigned magnitude. Some sample editors use signed and
others use unsigned -- it makes no difference in terms of sound
quality, but it's really annoying if you don't have a sample player
that supports both. If you play a sample and it sounds really noisy,
try the -z option -- you may have a signed magnitude sample on your hands.
The -m option is mainly of interest to programmers who wish to play
digitized sounds from within their own programs by shelling out to QD Play.
The -m option tells QD Play to treat the pathname argument as a memory
address expressed in decmial. QD Play then reads samples from this
memory location instead of loading a file. The argument to -m specifies
the length of the sample. E.g.,
play 340576 8000 -m32000
will play the 32000 bytes beginning at memory location 340,576 (decimal)
at a sample rate of 8kHz. WARNING: If you try to play a sample from
protected memory, the program will crash. Finally, note that this probably
won't work under a multitasking operating system like MultiTOS; it only works
when the full address space is available to all programs.
Command Line Usage Examples
---------------------------
Since QD Play's many options can be a bit daunting at first, here
are some examples to get you started quickly:
play chord.110 11000
Plays chord.110 at 11000 hertz through the ST speaker, using
the MFP for timing.
play stereo.125 12500 -2 -d
Plays stereo.125 at 12500 hertz through the STe 8-bit D/A using DMA,
treating the data as stereo.
play stereo.125 10000 -2 -d
Same effect as above. If you don't pick one of the STe DMA device's
four preset playback rates, QD Play will pick the closest one for you.
play stereo.125 10000 -2 -s
Unlike the example above, this command will actually play the
stereo sound at 10000 hertz, not 12500, since the -s option tells QD Play
to use the STe 8-bit D/A but to use the MFP for timing. Sound quality
is not as good with this method, but unlike the -d option (DMA sound device
timing) it offers playback at all sample rates.
play signed.080 8000 -z -re
Plays signed.080 at 8000 hertz through the ST Replay digitizer,
treating the data as signed magnitude.
play stereo.125 8000 -2
Plays stereo.125 at 8000 hertz through the ST speaker. The data
is interpreted as stereo, but the two channels are mixed to produce
mono data suitable for the ST speaker (since the ST speaker can't
play stereo sounds).
play deadjim.110 11000 -q -l -hippo
Loops deadjim.110 at 11000 hertz either 10 times or until a
key is pressed. No greeting message is printed, and the Hippo/Navaron
digitizer is used as the output device.
play rooster.080 8000 -r -re
Plays rooster.080 at 8000 hertz in reverse through the ST Replay
digitizer. Note that the -replay option can't be abbreviated to -r
because -r means "play the sample in reverse."
play chord.110 22000 -l
If run on an unaccelerated ST, locks up your machine. 22000 hertz is
too fast for a looped sample on an unmodified ST. Keep looped samples
down below 16 kHz to be safe.
play 123456 11000 -m120000 -z
Plays the 120,000 bytes of signed sample data starting at memory
location 123,456 (decimal) through the ST speaker at a rate of 11kHz.
Miscellaneous Info About Samples and the ST
-------------------------------------------
A sanity-preserving convention I've come up with after dealing with
literally thousands of samples is to store the sample rate in the filename
extension. E.g.,
filename.110 -> 11.0 kHz -> 11000 Hz
filaname.123 -> 12.3 kHz -> 12300 Hz
filename.062 -> 6.2 kHz -> 6200 Hz
It helps a lot, since sample speed is not normally encoded in the samples
themselves. (Sample editing programs usually have their own sample format,
but the most compatbile format